import { ApiTags } from '@nestjs/swagger/dist/decorators';
import { Controller, Get, Query } from '@nestjs/common';
import { PeerCarService } from './peer-car.service';

@ApiTags('同行车源')
@Controller('peercar')
export class PeerCarController {
  constructor(private readonly peerCarService: PeerCarService) {}
  
  @Get('page')
  async findPage(@Query() query: any) {
    return await this.peerCarService.findPage(query)
  }

  @Get('img')
  async findPeerImg(@Query() query: { peerId: string }) {
    return await this.peerCarService.findPeerImg(query.peerId)
  }
}
